package com.hryk.medical.login.ui;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.baoteng.base.component.BaseFragment;
import com.hryk.medical.MainActivity;
import com.hryk.medical.R;

/**
 * Author: admin
 * Date: 2020/3/20
 */
public class LoginAccountFragment extends BaseFragment implements View.OnClickListener {

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fmt_login_account, null);
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        initView(view);
    }

    private void initView(View view) {

        view.findViewById(R.id.login_account_btn).setOnClickListener(this);
        view.findViewById(R.id.register_account_btn).setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.login_account_btn:
                startActivity(new Intent(mContext, MainActivity.class));
                break;
            case R.id.register_account_btn:
                startActivity(new Intent(mContext, RegisterActivity.class));
                break;
        }
    }
}
